import axios from '@/request/http'
import Qs from "qs"
export default {
     //开启命名空间
  namespaced: true,
  //<!-- 在.vue文件中通过this.$store.state.xxx来进行获取 --> 全局状态
  state: {
    name: "张洁",
    list:[]
  },
  getters: {
    newName(state){
        return state.name + '的模块'
    }
},
mutations: {
    CHANGE_NAME(state,res){
        state.list = res
    }
},
actions: {
    init(){
        // let userId=Qs.stringify({userId:""})
        // axios.post("/user/findAllMyEntrust",
        //     userId
        // ).then((res) => {
        //     console.log(res);
        //     commit("CHANGE_NAME",res)
        //   })
        // console.log('发起异步');
    }
},
}